/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BasicBehavior } from "../models/BasicBehavior";
import type { BasicIndicator } from "../models/BasicIndicator";
import type { ClickBehavior } from "../models/ClickBehavior";
import type { InterfaceIndicator } from "../models/InterfaceIndicator";
import type { JavaScriptError } from "../models/JavaScriptError";
import type { PageSkipBehavior } from "../models/PageSkipBehavior";
import type { PromiseError } from "../models/PromiseError";
import type { Replay } from "../models/Replay";
import type { ResourceError } from "../models/ResourceError";
import type { ResourceIndicator } from "../models/ResourceIndicator";
import type { RoutingSkipBehavior } from "../models/RoutingSkipBehavior";

import type { CancelablePromise } from "../core/CancelablePromise";
import type { BaseHttpRequest } from "../core/BaseHttpRequest";

export class Service {
  constructor(public readonly httpRequest: BaseHttpRequest) {}

  /**
   * 基础指标上传
   * @returns any 成功
   * @throws ApiError
   */
  public postPerformancesBasicindicators({
    requestBody,
  }: {
    requestBody?: Array<BasicIndicator>;
  }): CancelablePromise<{
    /**
     * 处理时间
     */
    timestamp: string;
    /**
     * 状态编码
     */
    status: number;
    /**
     * 状态描述
     */
    message: string;
  }> {
    return this.httpRequest.request({
      method: "POST",
      url: "/performances/basicindicators",
      body: requestBody,
      mediaType: "application/json",
    });
  }

  /**
   * 接口指标上传
   * @returns any 成功
   * @throws ApiError
   */
  public postPerformancesInterfaceindicators({
    requestBody,
  }: {
    requestBody?: Array<InterfaceIndicator>;
  }): CancelablePromise<{
    /**
     * 处理时间
     */
    timestamp: string;
    /**
     * 状态编码
     */
    status: number;
    /**
     * 状态描述
     */
    message: string;
  }> {
    return this.httpRequest.request({
      method: "POST",
      url: "/performances/interfaceindicators",
      body: requestBody,
      mediaType: "application/json",
    });
  }

  /**
   * 资源指标上传
   * @returns any 成功
   * @throws ApiError
   */
  public postPerformancesResourceindicators({
    requestBody,
  }: {
    requestBody?: Array<ResourceIndicator>;
  }): CancelablePromise<{
    /**
     * 处理时间
     */
    timestamp: string;
    /**
     * 状态编码
     */
    status: number;
    /**
     * 状态描述
     */
    message: string;
  }> {
    return this.httpRequest.request({
      method: "POST",
      url: "/performances/resourceindicators",
      body: requestBody,
      mediaType: "application/json",
    });
  }

  /**
   * 资源错误上传
   * @returns any 成功
   * @throws ApiError
   */
  public postErrorsResourceerrors({
    requestBody,
  }: {
    requestBody?: Array<ResourceError>;
  }): CancelablePromise<{
    /**
     * 处理时间
     */
    timestamp: string;
    /**
     * 状态编码
     */
    status: number;
    /**
     * 状态描述
     */
    message: string;
  }> {
    return this.httpRequest.request({
      method: "POST",
      url: "/errors/resourceerrors",
      body: requestBody,
      mediaType: "application/json",
    });
  }

  /**
   * JavaScript错误上传
   * @returns any 成功
   * @throws ApiError
   */
  public postErrorsJavascripterrors({
    requestBody,
  }: {
    requestBody?: Array<JavaScriptError>;
  }): CancelablePromise<{
    /**
     * 处理时间
     */
    timestamp: string;
    /**
     * 状态编码
     */
    status: number;
    /**
     * 状态描述
     */
    message: string;
  }> {
    return this.httpRequest.request({
      method: "POST",
      url: "/errors/javascripterrors",
      body: requestBody,
      mediaType: "application/json",
    });
  }

  /**
   * Promise错误上传
   * @returns any 成功
   * @throws ApiError
   */
  public postErrorsPromiseerrors({
    requestBody,
  }: {
    requestBody?: Array<PromiseError>;
  }): CancelablePromise<{
    /**
     * 处理时间
     */
    timestamp: string;
    /**
     * 状态编码
     */
    status: number;
    /**
     * 状态描述
     */
    message: string;
  }> {
    return this.httpRequest.request({
      method: "POST",
      url: "/errors/promiseerrors",
      body: requestBody,
      mediaType: "application/json",
    });
  }

  /**
   * 基础行为上传
   * @returns any 成功
   * @throws ApiError
   */
  public postBehaviorsBasicbehaviors({
    requestBody,
  }: {
    requestBody?: Array<BasicBehavior>;
  }): CancelablePromise<{
    /**
     * 处理时间
     */
    timestamp: string;
    /**
     * 状态编码
     */
    status: number;
    /**
     * 状态描述
     */
    message: string;
  }> {
    return this.httpRequest.request({
      method: "POST",
      url: "/behaviors/basicbehaviors",
      body: requestBody,
      mediaType: "application/json",
    });
  }

  /**
   * 点击行为上传
   * @returns any 成功
   * @throws ApiError
   */
  public postBehaviorsClickbehaviors({
    requestBody,
  }: {
    requestBody?: Array<ClickBehavior>;
  }): CancelablePromise<{
    /**
     * 处理时间
     */
    timestamp: string;
    /**
     * 状态编码
     */
    status: number;
    /**
     * 状态描述
     */
    message: string;
  }> {
    return this.httpRequest.request({
      method: "POST",
      url: "/behaviors/clickbehaviors",
      body: requestBody,
      mediaType: "application/json",
    });
  }

  /**
   * 页面跳转行为上传
   * @returns any 成功
   * @throws ApiError
   */
  public postBehaviorsPageskipbehaviors({
    requestBody,
  }: {
    requestBody?: Array<PageSkipBehavior>;
  }): CancelablePromise<{
    /**
     * 处理时间
     */
    timestamp: string;
    /**
     * 状态编码
     */
    status: number;
    /**
     * 状态描述
     */
    message: string;
  }> {
    return this.httpRequest.request({
      method: "POST",
      url: "/behaviors/pageskipbehaviors",
      body: requestBody,
      mediaType: "application/json",
    });
  }

  /**
   * 路由跳转行为上传
   * @returns any 成功
   * @throws ApiError
   */
  public postBehaviorsRoutingskipbehaviors({
    requestBody,
  }: {
    requestBody?: Array<RoutingSkipBehavior>;
  }): CancelablePromise<{
    /**
     * 处理时间
     */
    timestamp: string;
    /**
     * 状态编码
     */
    status: number;
    /**
     * 状态描述
     */
    message: string;
  }> {
    return this.httpRequest.request({
      method: "POST",
      url: "/behaviors/routingskipbehaviors",
      body: requestBody,
      mediaType: "application/json",
    });
  }

  /**
   * 回溯上报
   * @returns any 成功
   * @throws ApiError
   */
  public postReplayReport({
    requestBody,
  }: {
    requestBody?: Replay;
  }): CancelablePromise<{
    /**
     * 处理时间
     */
    timestamp: string;
    /**
     * 状态编码
     */
    status: number;
    /**
     * 状态描述
     */
    message: string;
  }> {
    return this.httpRequest.request({
      method: "POST",
      url: "/replay/report",
      body: requestBody,
      mediaType: "application/json",
    });
  }
}
